package org.tc.client.service;

import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.tc.client.entity.Users;

@RequestMapping("UseraServices")
public interface UserServices {

    @RequestMapping("/loginUser")
    Users login(@RequestParam("phone")String phone, @RequestParam("pwd")String pwd);
    @RequestMapping("/insertUser")
    int insertUser(@RequestBody Users users);

    @PostMapping("/selectUser")
    Users selectUser(@RequestParam("id") Integer id);

    @RequestMapping("/selectByPhone")
    Users selectByPhone(@RequestParam("phone") String phone,@RequestParam(name = "nickname",required = false)String nickname);

    @PostMapping("/updateUsersById")
    int updateUsersById(@RequestBody Users users);

    //添加会员
    @PostMapping("/insertBuMemNum")
    int insertBuMemNum(@RequestBody Users users);

    //修改会员积分
    @PostMapping("/updateScoreByMemNumber")
    int updateScoreByMemNumber(@RequestBody Users user);

}
